package org.blade.personal.framework.orm.base;

import org.blade.personal.framework.components.metadata.TypeMetaData;
import org.blade.personal.framework.dsl.express.Expression;
import org.blade.personal.framework.orm.AbstractTypeAlias;
import org.blade.personal.framework.orm.TypeAlias;

/**
 * 整型别名类
 * 
 * @author ZGF
 * @version 0.1
 */
public class IntegerAlias extends AbstractTypeAlias<Integer> implements
		TypeAlias<Integer> {

	public IntegerAlias(Attribute<Integer> attr, String clause, String alise,
			String sqlAlise, String type, Expression expr) {
		TypeMetaData<Integer> metaData = new TypeMetaData<Integer>(attr,  clause,  alias,
				 sqlAlise,  type,  expr);
		this.init(metaData);
	}

	/**
	 * 初始化方法，使用元数据进行初始化
	 * 
	 * @param metaData
	 */
	public IntegerAlias(TypeMetaData<Integer> metaData) {
		super(metaData);
	}

	public IntegerAlias() {

	}

	public IntegerAlias(String name, Integer value,
			String table, String tableAlise, String javaType) {
		this.attr = new Attribute<Integer>(name, value, table);
		this.alias = tableAlise;
		this.type = javaType;
	}

	public TypeAlias<Integer> setAlise(String alise) {
		this.alias = alise;
		return this;
	}

}
